home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / H-I / HypertalkTools.cpt / Menus For HyperCard™ / card_3740.txt < prev    next >
Text File  |  1989-02-26  |  2KB  |  53 lines

  1. -- card: 3740 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 2721
  5. -- name: DeleteMenu
  6.  
  7.  
  8. -- part 2 (button)
  9. -- low flags: 00
  10. -- high flags: A003
  11. -- rect: left=334 top=278 right=295 bottom=464
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Go See NewMenu
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   go to card id 3302
  23.   Find "closeStack" in field "Description"
  24. end mouseUp
  25.  
  26.  
  27.  
  28. -- part contents for background part 20
  29. ----- text -----
  30. 4
  31.  
  32. -- part contents for background part 1
  33. ----- text -----
  34. XFCN
  35.  
  36. -- part contents for background part 22
  37. ----- text -----
  38. DeleteMenu(menuNumber)
  39.  
  40. -- part contents for background part 13
  41. ----- text -----
  42. DeleteMenu is an XFCN that allows you to delete any menus you've added to HyperCard using the NewMenu XFCN.  Failure to delete added menus could lead to severe problems in memory and crash HyperCard!
  43.  
  44. The menu reference number you provide to to DeleteMenu should be the same number that was returned by NewMenu.
  45.  
  46. Do NOT, hoevevr, call DeleteMenu to delete menus that you've already deleted!  You need to balance the calls for each menu.  Call NewMenu ONCE to create a menu (usually in either openStack, openBackground or openCard), and call DeleteMenu ONCE to delete it (in the matching closeStack, closeBackground, or closeCard).  
  47.  
  48. Repeat as neccessary.  Rinse.
  49.  
  50. For the best example of use see the sample script provided in NewMenu.
  51.  
  52.  
  53.